import React from 'react';

import Pts from 'prop-types';
const Myfunchild = (props) => {
    return (
        <div>
            <p>函数子组件--{props.username}</p>
        </div>
    );
}
//定义属性的类型校验
Myfunchild.propTypes = {
    username: Pts.string
}

// 定义属性的默认值
Myfunchild.defaultProps = {
    username: '宝钗'
}

export default Myfunchild;
